layui.define([ 'form', 'laydate', 'table', ], function(exports) {
	var form = layui.form;
	var table = layui.table;
    var index = layui.index;
    
   var view = {
       init:function(){
      
        this.initSubmit();
        
        },
       
       initSubmit:function(){

    	   $(document).on('click','.add_SubMerchant',function(){
    		   
    		   if($("#curr_mainSellerId").html() == null){
    			   layer.alert("此商户不存在", {icon: 2});
    			   return false;
    		   }
    		   if($("#curr_mainSellerId").html() != 0){
    			   layer.alert("子公司不可添加子公司", {icon: 2});
    			   return false;
    		   }
    		   
    		   window.location="/user/subMerchant/showMainMerchantInfo.do";
    		   
    	   });
    	   
       }
      
        
   }
     exports('index',view);
    });